#include <map>
#include <string>
#include <vector>
#include <list>
#include <typeinfo>
#include <stdio.h>
namespace aspect {

struct stream{
	virtual void set(void *content,int size)
	{
		_offset = 0;
		if (!size) return;
		contents.resize(size);
		memcpy(&contents[_offset],content,size);
	}
	stream(){
		_offset = 0;
		_size = 0;
	}
	virtual ~stream(){}
	virtual bool append(const void *content,unsigned int size)
	{
		if (size == 0) return false;
		if (contents.size() - _offset < size)
		{
			contents.resize(_offset + size);
		}
		memcpy(&contents[_offset],content,size);
		_offset += size;
		_size = _offset;
		return true;
	}
	virtual bool pick(void *content,unsigned int size)
	{
		if (contents.size() - _offset < size)
		{
			return false;
		}
		memcpy(content,&contents[_offset],size);
		_offset += size;
		return true;
	}
	virtual void reset(){_offset = 0;}
	std::vector<unsigned char> contents;
	virtual unsigned int size(){return _size;}
	virtual void * content(){return &contents[0];}
private:
	int _offset;
	int _size;
};

template<typename A>
struct istype{static const bool BOOLVALUE = false;};
template<>
struct istype<int>{static const bool BOOLVALUE = true;};
template<>
struct istype<float>{static const bool BOOLVALUE = true;};
template<>
struct istype<long>{static const bool BOOLVALUE = true;};
template<>
struct istype<double>{static const bool BOOLVALUE = true;};
template<>
struct istype<unsigned int>{static const bool BOOLVALUE = true;};
template<>
struct istype<unsigned long>{static const bool BOOLVALUE = true;};
template<>
struct istype<char>{static const bool BOOLVALUE = true;};
template<>
struct istype<short>{static const bool BOOLVALUE = true;};
template<>
struct istype<unsigned char>{static const bool BOOLVALUE = true;};
template<>
struct istype<unsigned short>{static const bool BOOLVALUE = true;};
	
template<typename A>
struct isstring{
	static const bool BOOLVALUE = false;
};
template<>
struct isstring<std::string>{
	static const bool BOOLVALUE = true;
};
template<typename A>
struct ischars { static const bool BOOLVALUE = false; };
template<>
struct ischars<const char*> { static const bool BOOLVALUE = true; };

template<typename A>
struct remove_pointer { typedef A TYPE; };
template<typename A>
struct remove_pointer< A * > { typedef  A TYPE; };
	
template<typename TYPE>
struct base_type{
	static bool append(TYPE &type,stream *ss)
	{
		ss->append(type,sizeof(*type));
		return true;
	}
	static bool pick(TYPE &type,stream *ss)
	{
		ss->pick(type,sizeof(*type));
		return true;
	}
};

template<typename TYPE>
struct string_type{
	static bool append(TYPE &type,stream *ss)
	{
		int len = type->size();
		ss->append(&len,sizeof(int));
		if (len)
		ss->append(type.c_str(),len);
		return true;
	}
	static bool pick(TYPE &type,stream *ss)
	{
		int len = 0;
		ss->pick(&len,sizeof(int));
		if (len)
		{
			type->resize(len);
			ss->pick(&(*type)[0],len);
		}
		return true;
	}
};

template<typename TYPE>
struct chars_type{
	static bool append(TYPE &type,stream *ss)
	{	 
		int n = 0;
		ss->append(n,sizeof(n));
		return true;
	}
	static bool pick(TYPE &type,stream *ss)
	{
		int n = 0;
		ss->pick(n,sizeof(n));
		return true;
	}
};
	
template<typename TYPE>
struct null_type{
	static bool append(TYPE &type,stream *ss)
	{	 
		int n = 0;
		ss->append(n,sizeof(n));
		return true;
	}
	static bool pick(TYPE &type,stream *ss)
	{
		ss->pick(n,sizeof(n));
		return true;
	}
};

template<bool C, typename A, typename B> struct if_ {};
template<typename A, typename B>		struct if_<true, A, B> { typedef A TYPE; };
template<typename A, typename B>		struct if_<false, A, B> { typedef B TYPE; };
	
struct function {
	int classid;
	virtual void call(){}
	virtual void conbine(function *afunc){}
	virtual void attach(function *afunc){}
	virtual std::string typeid_name() {return "";}
	template <typename T1>
	void append(T1 &arg1,stream *ss)
	{		
		_if<is_type<remove_pointer<T1>::TYPE>::BOOLVALUE, 
			/**TRUE**/
			base_type<remove_pointer<T1>::TYPE>
			,
			/**FALSE**/
			_if<isstring<remove_pointer<T1>::TYPE>::BOOLVALUE,
				/**TRUE**/
				string_type<remove_pointer<T1>::TYPE>
				,
				/**FALSE**/
				_if<ischars<remove_pointer<T1>::TYPE>::BOOLVALUE,
					/**TRUE*/
					chars_type<remove_pointer<T1>::TYPE>
					,
					/**FALSE**/
					null_type<remove_pointer<T1>::TYPE>
					>::TYPE
				>::TYPE
			>TYPE::append(arg1,ss);
	}
	template <typename T1>
	void pick(T1 &arg1,stream *ss)
	{		
		_if<is_type<remove_pointer<T1>::TYPE>::BOOLVALUE, 
			/**TRUE**/
			base_type<remove_pointer<T1>::TYPE>
			,
			/**FALSE**/
			_if<isstring<remove_pointer<T1>::TYPE>::BOOLVALUE,
				/**TRUE**/
				string_type<remove_pointer<T1>::TYPE>
				,
				/**FALSE**/
				_if<ischars<remove_pointer<T1>::TYPE>::BOOLVALUE,
					/**TRUE*/
					chars_type<remove_pointer<T1>::TYPE>
					,
					/**FALSE**/
					null_type<remove_pointer<T1>::TYPE>
					>::TYPE
				>::TYPE
			>TYPE::pick(arg1,ss);
	}
};

template<typename RVAL,
		typename T1=void,
		typename T2=void,
		typename T3=void,
		typename T4=void,
		typename T5=void,
		typename T6=void,
		typename T7=void,
		typename T8=void,
		typename T9=void,
		typename T10=void,
		typename T11=void,
		typename T12=void,
		typename T13=void,
		typename T14=void,
		typename T15=void,
		typename T16=void,
		typename T17=void,
		typename T18=void,
		typename T19=void,
		typename T20=void,
		typename T21=void,
		typename T22=void,
		typename T23=void,
		typename T24=void>
struct message:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &,
								T20 &,
								T21 &,
								T22 &,
								T23 &,
								T24 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &,
					  T20 &,
					  T21 &,
					  T22 &,
					  T23 &,
					  T24 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &,
										  T20 &,
										  T21 &,
										  T22 &,
										  T23 &,
										  T24 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22,
						T23 &arg23,
						T24 &arg24)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &,
						 T20 &,
						 T21 &,
						 T22 &,
						 T23 &,
						 T24 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &,
										   T20 &,
										   T21 &,
										   T22 &,
										   T23 &,
										   T24 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22,
						T23 &arg23,
						T24 &arg24)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24);
		}	
	};
	
	invoker_base *invoker;
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	T20 *arg20;
	T21 *arg21;
	T22 *arg22;
	T23 *arg23;
	T24 *arg24;
	
    message(){invoker = 0;classid = 24;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19,
               T20 &arg20,
               T21 &arg21,
               T22 &arg22,
               T23 &arg23,
               T24 &arg24)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
		this->arg20 = (&arg20);
		this->arg21 = (&arg21);
		this->arg22 = (&arg22);
		this->arg23 = (&arg23);
		this->arg24 = (&arg24);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &,
						   T20 &,
						   T21 &,
						   T22 &,
						   T23 &,
						   T24 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19,*arg20,*arg21,*arg22,*arg23,*arg24);
		}
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
		append(arg20,&ss);
		append(arg21,&ss);
		append(arg22,&ss);
		append(arg23,&ss);
		append(arg24,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
		pick(arg20,&ss);
		pick(arg21,&ss);
		pick(arg22,&ss);
		pick(arg23,&ss);
		pick(arg24,&ss);
	}
	 
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};


template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18,
		typename T19,
		typename T20,
		typename T21,
		typename T22,
		typename T23>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &,
								T20 &,
								T21 &,
								T22 &,
								T23 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &,
					  T20 &,
					  T21 &,
					  T22 &,
					  T23 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &,
										  T20 &,
										  T21 &,
										  T22 &,
										  T23 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22,
						T23 &arg23)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &,
						 T20 &,
						 T21 &,
						 T22 &,
						 T23 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &,
										   T20 &,
										   T21 &,
										   T22 &,
										   T23 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22,
						T23 &arg23)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	T20 *arg20;
	T21 *arg21;
	T22 *arg22;
	T23 *arg23;
	
    message(){invoker = 0;classid = 23;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19,
               T20 &arg20,
               T21 &arg21,
               T22 &arg22,
               T23 &arg23)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
		this->arg20 = (&arg20);
		this->arg21 = (&arg21);
		this->arg22 = (&arg22);
		this->arg23 = (&arg23);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &,
						   T20 &,
						   T21 &,
						   T22 &,
						   T23 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19,*arg20,*arg21,*arg22,*arg23);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
		append(arg20,&ss);
		append(arg21,&ss);
		append(arg22,&ss);
		append(arg23,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
		pick(arg20,&ss);
		pick(arg21,&ss);
		pick(arg22,&ss);
		pick(arg23,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18,
		typename T19,
		typename T20,
		typename T21,
		typename T22>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &,
								T20 &,
								T21 &,
								T22 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &,
					  T20 &,
					  T21 &,
					  T22 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &,
										  T20 &,
										  T21 &,
										  T22 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &,
						 T20 &,
						 T21 &,
						 T22 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &,
										   T20 &,
										   T21 &,
										   T22 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21,
						T22 &arg22)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	T20 *arg20;
	T21 *arg21;
	T22 *arg22;
	
    message(){invoker = 0;classid = 22;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19,
               T20 &arg20,
               T21 &arg21,
               T22 &arg22)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
		this->arg20 = (&arg20);
		this->arg21 = (&arg21);
		this->arg22 = (&arg22);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &,
						   T20 &,
						   T21 &,
						   T22 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19,*arg20,*arg21,*arg22);
		}
	}
	
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
		append(arg20,&ss);
		append(arg21,&ss);
		append(arg22,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
		pick(arg20,&ss);
		pick(arg21,&ss);
		pick(arg22,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18,
		typename T19,
		typename T20,
		typename T21>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &,
								T20 &,
								T21 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &,
					  T20 &,
					  T21 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &,
										  T20 &,
										  T21 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &,
						 T20 &,
						 T21 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &,
										   T20 &,
										   T21 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20,
						T21 &arg21)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	T20 *arg20;
	T21 *arg21;
	
    message(){invoker = 0;classid = 21;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19,
               T20 &arg20,
               T21 &arg21)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
		this->arg20 = (&arg20);
		this->arg21 = (&arg21);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &,
						   T20 &,
						   T21 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19,*arg20,*arg21);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
		append(arg20,&ss);
		append(arg21,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
		pick(arg20,&ss);
		pick(arg21,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18,
		typename T19,
		typename T20>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &,
								T20 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &,
					  T20 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &,
										  T20 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &,
						 T20 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &,
										   T20 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19,
						T20 &arg20)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	T20 *arg20;
	
    message(){invoker = 0;classid = 20;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19,
               T20 &arg20)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
		this->arg20 = (&arg20);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &,
						   T20 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19,*arg20);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
		append(arg20,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
		pick(arg20,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18,
		typename T19>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &,
								T19 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &,
					  T19 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &,
										  T19 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &,
						 T19 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &,
										   T19 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18,
						T19 &arg19)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	T19 *arg19;
	
    message(){invoker = 0;classid = 19;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18,
               T19 &arg19)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
		this->arg19 = (&arg19);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &,
						   T19 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18,*arg19);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
		append(arg19,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
		pick(arg19,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17,
		typename T18>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &,
								T18 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &,
					  T18 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &,
										  T18 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &,
						 T18 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &,
										   T18 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17,
						T18 &arg18)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	T18 *arg18;
	
    message(){invoker = 0;classid = 18;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17,
               T18 &arg18)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
		this->arg18 = (&arg18);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &,
						   T18 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17,*arg18);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
		append(arg18,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
		pick(arg18,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16,
		typename T17>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &,
								T17 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &,
					  T17 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &,
										  T17 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &,
						 T17 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &,
										   T17 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16,
						T17 &arg17)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	T17 *arg17;
	
    message(){invoker = 0;classid = 17;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16,
               T17 &arg17)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
		this->arg17 = (&arg17);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &,
						   T17 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16,*arg17);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
		append(arg17,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
		pick(arg17,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15,
		typename T16>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &,
								T16 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &,
					  T16 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &,
										  T16 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &,
						 T16 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &,
										   T16 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15,
						T16 &arg16)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	T16 *arg16;
	
    message(){invoker = 0;classid = 16;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15,
               T16 &arg16)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
		this->arg16 = (&arg16);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &,
						   T16 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15,*arg16);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
		append(arg16,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
		pick(arg16,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14,
		typename T15>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &,
								T15 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &,
					  T15 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &,
										  T15 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &,
						 T15 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &,
										   T15 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14,
						T15 &arg15)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	T15 *arg15;
	
    message(){invoker = 0;classid = 15;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14,
               T15 &arg15)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
		this->arg15 = (&arg15);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &,
						   T15 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14,*arg15);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
		append(arg15,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
		pick(arg15,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13,
		typename T14>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &,
								T14 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &,
					  T14 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &,
										  T14 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &,
						 T14 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &,
										   T14 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13,
						T14 &arg14)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	T14 *arg14;
	
    message(){invoker = 0;classid = 14;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13,
               T14 &arg14)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
		this->arg14 = (&arg14);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &,
						   T14 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13,*arg14);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
		append(arg14,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
		pick(arg14,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12,
		typename T13>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &,
								T13 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &,
					  T13 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &,
										  T13 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &,
						 T13 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &,
										   T13 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12,
						T13 &arg13)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	T13 *arg13;
	
    message(){invoker = 0;classid = 13;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12,
               T13 &arg13)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
		this->arg13 = (&arg13);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &,
						   T13 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12,*arg13);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
		append(arg13,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
		pick(arg13,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11,
		typename T12>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &,
								T12 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &,
					  T12 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &,
										  T12 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &,
						 T12 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &,
										   T12 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11,
						T12 &arg12)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	T12 *arg12;
	
    message(){invoker = 0;classid = 12;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11,
               T12 &arg12)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
		this->arg12 = (&arg12);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &,
						   T12 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11,*arg12);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
		append(arg12,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
		pick(arg12,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10,
		typename T11>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &,
								T11 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &,
					  T11 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &,
										  T11 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &,
						 T11 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &,
										   T11 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10,
						T11 &arg11)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	T11 *arg11;
	
    message(){invoker = 0;classid = 11;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10,
               T11 &arg11)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
		this->arg11 = (&arg11);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &,
						   T11 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10,*arg11);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
		append(arg11,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
		pick(arg11,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9,
		typename T10>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &,
								T10 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &,
					  T10 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &,
										  T10 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &,
						 T10 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &,
										   T10 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9,
						T10 &arg10)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	T10 *arg10;
	
    message(){invoker = 0;classid = 10;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9,
               T10 &arg10)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
		this->arg10 = (&arg10);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &,
						   T10 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9,*arg10);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
		append(arg10,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
		pick(arg10,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8,
		typename T9>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8,T9>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &,
								T9 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &,
					  T9 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &,
										  T9 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &,
						 T9 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &,
										   T9 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8,
						T9 &arg9)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	T9 *arg9;
	
    message(){invoker = 0;classid = 9;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8,
               T9 &arg9)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
		this->arg9 = (&arg9);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &,
						   T9 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8,*arg9);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
		append(arg9,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
		pick(arg9,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7,
		typename T8>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7,T8>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &,
								T8 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &,
					  T8 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &,
										  T8 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &,
						 T8 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &,
										   T8 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7,
						T8 &arg8)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	T8 *arg8;
	
    message(){invoker = 0;classid = 8;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7,
               T8 &arg8)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
		this->arg8 = (&arg8);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &,
						   T8 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7,*arg8);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
		append(arg8,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
		pick(arg8,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6,
		typename T7>
struct message<RVAL,T1,T2,T3,T4,T5,T6,T7>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &,
								T7 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &,
					  T7 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &,
										  T7 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &,
						 T7 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &,
										   T7 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6,
						T7 &arg7)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	T7 *arg7;
	
    message(){invoker = 0;classid = 7;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6,
               T7 &arg7)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
		this->arg7 = (&arg7);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &,
						   T7 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6,*arg7);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
		append(arg7,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
		pick(arg7,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};


template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5,
		typename T6>
struct message<RVAL,T1,T2,T3,T4,T5,T6>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &,
								T6 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &,
					  T6 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &,
										  T6 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5,arg6);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &,
						 T6 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &,
										   T6 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5,
						T6 &arg6)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5,arg6);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	T6 *arg6;
	
    message(){invoker = 0;classid = 6;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5,
               T6 &arg6)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
		this->arg6 = (&arg6);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &,
						   T6 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5,*arg6);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
		append(arg6,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
		pick(arg6,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};


template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4,
		typename T5>
struct message<RVAL,T1,T2,T3,T4,T5>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &,
								T5 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &,
					  T5 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &,
										  T5 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5)
		{
			return (func_)(arg1,arg2,arg3,arg4,arg5);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &,
						 T5 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &,
										   T5 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4,
						T5 &arg5)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4,arg5);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	T5 *arg5;
	
    message(){invoker = 0;classid = 5;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4,
               T5 &arg5)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
		this->arg5 = (&arg5);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &,
						   T5 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4,*arg5);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
		append(arg5,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
		pick(arg5,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3,
		typename T4>
struct message<RVAL,T1,T2,T3,T4>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &,
								T4 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &,
					  T4 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &,
										  T4 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4)
		{
			return (func_)(arg1,arg2,arg3,arg4);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &,
						 T4 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &,
										   T4 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3,
						T4 &arg4)
		{
			return (t_->*func_)(arg1,arg2,arg3,arg4);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	T4 *arg4;
	
    message(){invoker = 0;classid = 4;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3,
               T4 &arg4)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
		this->arg4 = (&arg4);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &,
						   T4 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3,*arg4);
		}
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
		append(arg4,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
		pick(arg4,&ss);
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1,
		typename T2,
		typename T3>
struct message<RVAL,T1,T2,T3>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &,
								T3 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &,
					  T3 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &,
										  T3 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3)
		{
			return (func_)(arg1,arg2,arg3);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &,
						 T3 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &,
										   T3 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2,
						T3 &arg3)
		{
			return (t_->*func_)(arg1,arg2,arg3);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	T3 *arg3;
	
    message(){invoker = 0;classid = 3;}	
	void build(T1 &arg1,
               T2 &arg2,
               T3 &arg3)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
		this->arg3 = (&arg3);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &,
						   T3 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2,*arg3);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
		append(arg3,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
		pick(arg3,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};


template<typename RVAL,
		typename T1,
		typename T2>
struct message<RVAL,T1,T2>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &,
								T2 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &,
					  T2 &);
		function_ptr_invoker(RVAL (*func)(T1 &,
										  T2 &)):func_(func){}
		RVAL operator()(T1 &arg1,
						T2 &arg2)
		{
			return (func_)(arg1,arg2);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &,
						 T2 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &,
										   T2 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1,
						T2 &arg2)
		{
			return (t_->*func_)(arg1,arg2);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	T2 *arg2;
	
    message(){invoker = 0;classid = 2;}	
	void build(T1 &arg1,
               T2 &arg2)
	{
		this->arg1 = (&arg1);
		this->arg2 = (&arg2);
	}
	void bind(RVAL (*func)(T1 &,
						   T2 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1,*arg2);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
		append(arg2,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
		pick(arg2,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL,
		typename T1>
struct message<RVAL,T1>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()(T1 &) = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)(T1 &);
		function_ptr_invoker(RVAL (*func)(T1 &)):func_(func){}
		RVAL operator()(T1 &arg1)
		{
			return (func_)(arg1);
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)(T1 &);
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(T1 &),T *t):func_(func),t_(t){}
		RVAL operator()(T1 &arg1)
		{
			return (t_->*func_)(arg1);
		}	
	};
	
	invoker_base *invoker;
	
	T1 *arg1;
	
    message(){invoker = 0;classid = 1;}	
	void build(T1 &arg1)
	{
		this->arg1 = (&arg1);
	}
	void bind(RVAL (*func)(T1 &))
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)(*arg1);
		}
	}
	void to_stream(stream &ss)
	{
		append(arg1,&ss);
	}
	void from_stream(stream &ss)
	{
		pick(arg1,&ss);
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};

template<typename RVAL>
struct message<RVAL>:public function {	
	class invoker_base {
	public:
		virtual RVAL operator()() = 0;
	};
	class function_ptr_invoker : public invoker_base {
	public:
		RVAL (*func_)();
		function_ptr_invoker(RVAL (*func)()):func_(func){}
		RVAL operator()()
		{
			return (func_)();
		}
	};
	template<typename T>
	class member_ptr_invoker : public invoker_base {
	public:
		RVAL (T::*func_)();
		T *t_;
		member_ptr_invoker(RVAL (T::*func)(),T *t):func_(func),t_(t){}
		RVAL operator()()
		{
			return (t_->*func_)();
		}	
	};
	
	invoker_base *invoker;
	
	
    message(){invoker = 0;classid = 0;}	
	void build()
	{
		
	}
	void bind(RVAL (*func)())
	{
		this->invoker = new function_ptr_invoker(func);
	}
	void call()
	{
		if (invoker)
		{
			(*invoker)();
		}
	}
	void to_stream(stream &ss)
	{
		 
	}
	void from_stream(stream &ss)
	{
		 
	}
	void conbine(function *afunc)
	{
		if (classid == afunc->classid && typeid_name() == afunc->typeid_name())
		{
			this->invoker = ((message*)afunc)->invoker;
		}
	}
	void attach(function *afunc)
	{
		this->invoker = ((message*)afunc)->invoker;
	}
	template<typename CLASS,typename FUNC>
	void bind(FUNC func,CLASS *o)
	{
		this->invoker = new member_ptr_invoker<CLASS>(func,o);
	}
	virtual std::string typeid_name()
	{
		return typeid(message).name();
	}
};


class AspectManager {
public:
	std::vector<std::string> split(std::string str,std::string pattern)
	{
		std::string::size_type pos;
		std::vector<std::string> result;
		str+=pattern;
		int size=str.size();

		for(int i=0; i<size; i++)
		{
			pos=str.find(pattern,i);
			if(pos<size)
			{
				std::string s=str.substr(i,pos-i);
				result.push_back(s);
				i=pos+pattern.size()-1;
			}
		}
		return result;
	} 
	void add(const std::string & name,function *afunc)
	{
		std::vector<std::string> nn = split(name,":");
		if (nn.size() != 2) return;
		std::string filename = nn[0];
		std::string pointname = nn[1];
		std::string msgidname = afunc->typeid_name();
		if (filename != "*")
		{
			if (pointname != "*")
			{
				if (pointname.size() && *pointname.rbegin() != '*')
				{
					_msgid_functions[filename + "-" + pointname + "-" + msgidname] = afunc; // 1
				}
				else
				{
					_file_point_anymsgid_map[filename][pointname].push_back(afunc); // 2
				}
			}
			else
			{
				_file_anypoint_map[filename].push_back(afunc); // 3
			}
		}
		else
		{
			if (pointname.size() && *pointname.rbegin() != '*')
			{
				_anyfile_point_msgid_map[pointname + "-" + msgidname].push_back(afunc); // 4
			}
			else
			{
				_anyfile_point_anymsgid_map[pointname].push_back(afunc); // 5
			}
		}
	}
	static AspectManager * getInstance()
	{
		static AspectManager me;
		return &me;
	}
	 
	 
	std::vector<function*> * find3(const std::string &filename)
	{
		_file_anypoint_map_iter iter = _file_anypoint_map.find(filename);
		if (iter != _file_anypoint_map.end())
		{
			return iter->second;
		}
		return 0;
	}
	
	std::vector<function*> * find2(const std::string &filename,const std::string &pointname)
	{
		_file_point_anymsgid_map_iter iter = _file_point_anymsgid_map.find(pointname);
		if (iter != _file_point_anymsgid_map.end())
		{
			std::map<std::string,std::vector<function*>::iterator pos = iter->find(pointname);
			if (pos != iter->end())
			{
				return &pos->second;
			}
		}
		return 0;
	}
	
	function* find1(const std::string &filename,const std::string &pointname,const std::string &msgid)
	{
		std::string uname = filename + "-" + pointname + "-" + msgidname;
		_msgid_functions_iter::iterator iter = _msgid_functions.find(uname);
		if (iter != _msgid_functions.end())
		{
			return &iter->second;
		}
		return 0;
	}
	
	std::vector<function*> * find5(const std::string &pointname)
	{
		_anyfile_point_anymsgid_map_iter iter = _anyfile_point_anymsgid_map.find(pointname);
		if (iter != _anyfile_point_anymsgid_map.end())
		{
			return &iter->second;
		}
		return 0;
	}
	
	std::vector<function*> * find4(const std::string &pointname,const std::string &msigid)
	{
		std::string uname = pointname + "-" + msigid;
		_anyfile_point_msgid_map_iter iter = _anyfile_point_msgid_map.find(uname);
		if (iter != _anyfile_point_msgid_map.end())
		{
			return &iter->second;
		}
		return 0;
	}
private:
	std::map<std::string,function*> _msgid_functions; // {file:point}
	typedef std::map<std::string,function*>::iterator _msgid_functions_iter;
	
	std::map<std::string,std::map<std::string,std::vector<function*> > > _file_point_anymsgid_map;; // {file:point*}
	typedef std::map<std::string,std::map<std::string,std::vector<function*> > >::iterator _file_point_anymsgid_map_iter;
	
	std::map<std::string,std::vector<function*> > _file_anypoint_map;    // {file:*}
	typedef std::map<std::string,std::vector<function*> >::iterator _file_anypoint_map_iter;
	
	std::map<std::string,std::vector<function*> > _anyfile_point_anymsgid_map;
	typedef std::map<std::string,std::vector<function*> >::iterator _anyfile_point_anymsgid_map_iter; // {*:point*}
	
	std::map<std::string,std::vector<function*> > _anyfile_point_msgid_map;
	typedef std::map<std::string,std::vector<function*> >::iterator _anyfile_point_msgid_map_iter;// {*:point}
	
};

class Aspect {
public:
	void setPointName(const std::string &filePath,const std::string &pointName)
	{
		int pos = filePath.find_last_of('/');
		std::string fileName = filePath.substr(pos + 1);
		
		_fileName = fileName;
		_msgidName = "";
		_pointName = pointName;
	
		//printf("_uniquePointName %s %s\n",_uniquePointName.c_str(),filePath.c_str());
	}
	void setFunctionName(const std::string &functionName)
	{
		_functionName = functionName;
	}
   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9,typename T10,typename T11,typename T12>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7,T8 &t8,T9 &t9,T10 &t10,T11 &t11,T12 &t12)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9,typename T10,typename T11>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7,T8 &t8,T9 &t9,T10 &t10,T11 &t11)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9,typename T10>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7,T8 &t8,T9 &t9,T10 &t10)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8,typename T9>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7,T8 &t8,T9 &t9)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8,T9>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7,t8,t9); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7,typename T8>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7,T8 &t8)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7,T8>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7,t8); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6,typename T7>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6,T7 &t7)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6,T7> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6,T7>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6,t7); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5,typename T6>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5,T6 &t6)
	{
		message<void,Aspect,T1,T2,T3,T4,T5,T6> *msg = new message<void,Aspect,T1,T2,T3,T4,T5,T6>();
		
		msg->build(*this,t1,t2,t3,t4,t5,t6); 
		_function = msg;
		action();
	}

   template<typename T1,typename T2,typename T3,typename T4,typename T5>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4,T5 &t5)
	{
		message<void,Aspect,T1,T2,T3,T4,T5> *msg = new message<void,Aspect,T1,T2,T3,T4,T5>();
		
		msg->build(*this,t1,t2,t3,t4,t5); 
		_function = msg;
		action();
	}



   template<typename T1,typename T2,typename T3,typename T4>
	void build(T1 &t1,T2 &t2,T3 &t3,T4 &t4)
	{
		message<void,Aspect,T1,T2,T3,T4> *msg = new message<void,Aspect,T1,T2,T3,T4>();
		
		msg->build(*this,t1,t2,t3,t4); 
		_function = msg;
		action();
	}

	template<typename T1,typename T2,typename T3>
	void build(T1 &t1,T2 &t2,T3 &t3)
	{
		message<void,Aspect,T1,T2,T3> *msg = new message<void,Aspect,T1,T2,T3>();
		
		msg->build(*this,t1,t2,t3); 
		_function = msg;
		action();
	}

	template<typename T1,typename T2>
	void build(T1 &t1,T2 &t2)
	{
		message<void,Aspect,T1,T2> *msg = new message<void,Aspect,T1,T2>();
		
		msg->build(*this,t1,t2); 
		_function = msg;
		action();
	}
	template<typename T1>
	void build(T1 &t1)
	{
		message<void,Aspect,T1> *msg = new message<void,Aspect,T1>();
		
		msg->build(*this,t1); 
		_function = msg;
		action();
	}
	void build()
	{
		message<void,Aspect> *msg = new message<void,Aspect>();
		
		msg->build(*this); 
		
		_function = msg;
		action();
	}
	void action()
	{
		if (_function)
		{
			_msigidName = _function->typeid_name();
			_uniquePointName = _fileName + "-" + _pointName + "-"+ _msigidName;
			
			do{
				function * imp = AspectManager::getInstance()->find1(_fileName,_pointName,_msigidName);
				if (imp)
				{
					_function->conbine(imp);
					_function->call();
					break;
				}
				
				std::vector<function *> *imps = 0;
				
				if (!imps)
				{
					imps = AspectManager::getInstance()->find2( _fileName,_pointName);
				}
				
				if (!imps)
				{
					imps = AspectManager::getInstance()->find3( _fileName);
				}
				
				if (!imps)
				{
					imps = AspectManager::getInstance()->find4(_pointName,_msigidName);
				}
				
				if (!imps)
				{
					imps = AspectManager::getInstance()->find5(_pointName);
				}
				if (imps)
				{
					for(std::vector<function *>::iterator iter = imps->begin(); iter != imps->end();++iter)
					{
						function * imp = *iter;
						if (imp)
						{
							_function->attach(imp);
							_function->call();
						}
					}
				}
			}while (false);
			
		}
	}
	
	~Aspect()
	{
		if (_function)
		{
			delete _function;
			_function = 0;
		}
		else
		{
			 
		}
	}
   static Aspect * global()
   {
       static Aspect me;
       return &me;
   }
   
   std::string uniqueName(){return _uniquePointName;}
   std::string functionName(){return _functionName;}
private:
	std::string _uniquePointName;
	std::string _functionName;
	std::string _msgidName;
	std::string _fileName;
	std::string _pointName;
	function *_function;
	std::map<std::string,Aspect> _child;
	std::map<std::string,Aspect> _next;
	std::list<Aspect> _stack;
	Aspect *_parent;
	Aspect *_up;
public:
	void pushNext(Aspect & aspect)
	{
	   aspect._parent = _parent;
	   _next[aspect._uniquePointName] = aspect;
	}
	Aspect *next(const std::string &name)
	{
	   return &_next[name];
	}
	void pushStack(Aspect & aspect)
	{
	   aspect._parent = _parent;
	   aspect._up = this;
	   _stack.push_back(aspect);
	}
	Aspect *top()
	{
	   if (_stack.empty())return 0;
	   return &_stack.back();
	}
	void addChild(Aspect & aspect)
	{
		aspect._parent = this;
		_child[aspect._uniquePointName] = aspect;
	}

	Aspect *child(const std::string &name)
	{
		return &_child[name];
	}
	Aspect()
	{
		_function = 0;
		_parent = 0;
		_up = 0;
	}
	bool isRoot()
	{
		return _parent == global();
	}	
	int depth()
	{
		int depth = 0;
		Aspect *tmp = _parent;
		while (tmp != global())
		{
			depth ++;
			tmp = tmp->_parent; 
		}
		return depth;
	}
	int indexInParent()
	{
		int index = 0;
		Aspect *tmp = _up;
		while (tmp)
		{
			index ++;
			tmp = tmp->_up; 
		}
		return index;
	}
}; 


#define ASPECT_POINT(pointname) \
   aspect::Aspect *aspect##pointname = 0;\
   do{\
    aspect::Aspect _aspect##pointname;\
	_aspect##pointname.setPointName(__FILE__,#pointname);\
	_aspect##pointname.setFunctionName(__PRETTY_FUNCTION__);\
    aspect::Aspect::global()->addChild(_aspect##pointname);\
	aspect##pointname = aspect::Aspect::global()->child(_aspect##pointname.uniqueName());\
   }while (false);\
   if (aspect##pointname)\
   aspect##pointname->build

#define ASPECT_CHILD(pointname,aname)\
   aspect::Aspect *aspect##aname = 0;\
   do{\
      aspect::Aspect _aspect##pointname;\
	  _aspect##pointname.setPointName(__FILE__,#aname);\
	  _aspect##pointname.setFunctionName(__PRETTY_FUNCTION__);\
	  if (aspect##pointname)\
	  {\
      aspect##pointname->addChild(_aspect##pointname);\
	  aspect##aname = aspect##pointname->child(_aspect##pointname.uniqueName());\
	  }\
   }while (false);\
   if (aspect##aname)\
     aspect##aname->build

#define ASPECT_NEXT(pointname,aname)\
   aspect::Aspect *aspect##aname = 0;\
   do{\
      aspect::Aspect _aspect##pointname;\
	  _aspect##pointname.setPointName(__FILE__,#aname);\
	  _aspect##pointname.setFunctionName(__PRETTY_FUNCTION__);\
	  if (aspect##pointname)\
	  {\
      aspect##pointname->pushNext(_aspect##pointname);\
	  aspect##aname = aspect##pointname->next(_aspect##pointname.uniqueName());\
	  }\
   }while (false);\
   if (aspect##aname)\
     aspect##aname->build
	   

class Operator {
public:
	std::vector<Aspect*> aspects;
	void push(Aspect *aspect)
	{
		aspects.push_back(aspect);
	}
	Aspect* pop()
	{
		Aspect * tmp = aspects.back();
		aspects.pop_back();
		return tmp;
	}
	Aspect* top()
	{
		Aspect * tmp = aspects.back();
		return tmp;
	}
	int size()
	{
		return aspects.size();
	}
	void clear()
	{
		aspects.clear();
	}
};

class OperatorManager {
public:
	static OperatorManager & getMe()
	{
		static OperatorManager om;
		return om;
	}
	
	Operator & getOp(const std::string &name)
	{
		return _ops[name];
	}
	
	
private:
	std::map<std::string,Operator> _ops;
}; 

class AutoReleaseOp {
public:
	Operator &op;
	AutoReleaseOp(Operator &op):op(op)
	{}
	~AutoReleaseOp()
	{
		op.pop();
	}
	Aspect* top()
	{
		return op.top();
	}
	Aspect* pop()
	{
		return op.pop();
	}
	void push(Aspect *aspect)
	{
		op.push(aspect);
	}
	int size()
	{
		return op.size();
	}
};
 
#define _A_POINT_(pointname) \
  aspect::AutoReleaseOp autop(aspect::OperatorManager::getMe().getOp(#pointname));\
  aspect::Aspect * parent = 0;\
  if (autop.size() == 0)\
  {\
	 parent = aspect::Aspect::global();\
  }	\
  else\
  {\
	  parent = autop.top();\
  }\
  aspect::Aspect * aspect##pointname = 0;\
  do {\
  aspect::Aspect _aspect##pointname;\
	_aspect##pointname.setPointName(__FILE__,#pointname);\
	_aspect##pointname.setFunctionName(__PRETTY_FUNCTION__);\
  parent->addChild(_aspect##pointname);\
  aspect##pointname = parent->child(_aspect##pointname.uniqueName());\
  autop.push(aspect##pointname);\
  } while (false);\
  if (aspect##pointname)\
	aspect##pointname->build

#define _A_NEXT_(pointname)\
   do{\
      aspect::Aspect _aspect##pointname;\
	  _aspect##pointname.setPointName(__FILE__,#pointname);\
	  _aspect##pointname.setFunctionName(__PRETTY_FUNCTION__);\
      aspect##pointname->pushStack(_aspect##pointname);\
	  aspect##pointname = aspect##pointname->top();\
	  autop.pop();\
	  autop.push(aspect##pointname);\
   }while (false);\
   if (aspect##pointname)\
     aspect##pointname->build
	 
template<typename CLASS>
class AutoAspectLogicRegister{
public:
	AutoAspectLogicRegister()
	{
		object.__init__aspect__logic();
	}
	CLASS object;
};

#define ASPECT_LOGIC(CLASS)\
	aspect::AutoAspectLogicRegister<CLASS> AutoAspectLogicRegister__CLASS;\
	std::string CLASS::getClassName(){return #CLASS;}\
	void CLASS::__init__aspect__logic()
 
 
 #define BIND_ASPECT(pointname,FUNC,MSG)\
	do{\
		MSG *msg = new MSG();\
		msg->bind(FUNC,this);\
		aspect::AspectManager::getInstance()->add(pointname,msg);\
	} while (false)
		
#define ARG() aspect::message<void,aspect::Aspect>			
#define ARG1(a) aspect::message<void,aspect::Aspect,a>		
#define ARG2(a,b) aspect::message<void,aspect::Aspect,a,b>
#define ARG3(a,b,c) aspect::message<void,aspect::Aspect,a,b,c>
#define ARG4(a,b,c,d) aspect::message<void,aspect::Aspect,a,b,c,d>
#define ARG5(a,b,c,d,f) aspect::message<void,aspect::Aspect,a,b,c,d,f>
#define ARG6(a,b,c,d,f,e) aspect::message<void,aspect::Aspect,a,b,c,d,f,e>
#define ARG7(a,b,c,d,f,e,g) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g>
#define ARG8(a,b,c,d,f,e,g,h) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h>
#define ARG9(a,b,c,d,f,e,g,h,i) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i>
#define ARG10(a,b,c,d,f,e,g,h,i,j) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j>
#define ARG11(a,b,c,d,f,e,g,h,i,j,k) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k>
#define ARG12(a,b,c,d,f,e,g,h,i,j,k,l) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l>
#define ARG13(a,b,c,d,f,e,g,h,i,j,k,l,m) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m>
#define ARG14(a,b,c,d,f,e,g,h,i,j,k,l,m,n) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n>
#define ARG15(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o>
#define ARG16(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p>
#define ARG17(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q>
#define ARG18(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r>
#define ARG19(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r,s) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r,s>
#define ARG20(a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t) aspect::message<void,aspect::Aspect,a,b,c,d,f,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t>
#define DEC_ASPECT_LOGIC std::string getClassName();void __init__aspect__logic()


template<typename T>
class Value{
public:

  static T& v(const T &t){
      t_ = t;
      return t_;
   }
   static T t_;
};
template<typename T>
T Value<T>::t_;

template<typename T>
T & value(const T &t)
{
   return Value<T>::v(t);
}

std::string& value(const char * t)
{
   return Value<std::string>::v(t);
}

#define ASPECT_CONST aspect::value

} // namespace aspect


